package com.rtwo.service;

import com.rtwo.entity.Department;
import com.rtwo.entity.User;
import com.rtwo.repository.UserRepository;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.transaction.Transactional;

/**
 * Created by hasee on 2017/4/19.
 */
@Service
@Transactional
public class UserService {

    @Resource
    private UserRepository userRepository;

    public void save(User user){
        userRepository.save(user);
    }

    public User findUserByName(String name){
        return userRepository.findUserByName(name);
    }
}
